package com.qing.administer.controller;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.qing.administer.annotations.ResponseResult;
import com.qing.administer.annotations.WebLog;
import com.qing.administer.entity.SysConfig;
import com.qing.administer.entity.SysLog;
import com.qing.administer.service.SysLogService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 系统日志 前端控制器
 * </p>
 *
 * @author qing
 * @since 2021-09-17
 */
@Api(tags = "日志管理")
@ResponseResult
@RestController
@RequestMapping("/administer/sys-log")
public class SysLogController {


	@Autowired
	private SysLogService sysLogService;



	@WebLog("列表")
	@ApiOperation(value = "列表")
	@ApiImplicitParams({
			@ApiImplicitParam(name = "current",value = "当前页",required = true,defaultValue = "1"),
			@ApiImplicitParam(name = "size",value = "每页显示条数",required = true,defaultValue = "10"),
			@ApiImplicitParam(name = "keyword",value = "模糊匹配",required = false)
	})
	@GetMapping("/page")
	public IPage<SysLog> getPage(@RequestParam(value = "current",defaultValue = "1",required = false) Long current,
								 @RequestParam(value = "size",defaultValue = "10",required = false) Long size,
								 @RequestParam(value = "keyword",defaultValue = "",required = false) String keyword){

		return sysLogService.findPage(current,size,keyword);
	}



}

